I wish to be able to run a script which will place the cursor on an object that the script determines to be "empty"
string strBaseID
string strBlank = ""
string strSpace = " "
Object o
Module m = current
bool bBlankResult
string strModuleName = m."Name" // Get the complete DVP name
string strTemp
int nLength = 0
string strObjectText = strBlank
for o in m do
{
if (probeAttr_(o, "VV Test Identifier") == "Result")
{
bBlankResult = true
// Look for a result step that has Test Status empty
if (probeAttr_(o, "Test Status") == "DEFERRED")
bBlankResult = false
else if (probeAttr_(o, "Test Status") == "ANALYZED")
bBlankResult = false
else if (probeAttr_(o, "Test Status") == "PASS")
bBlankResult = false
else if (probeAttr_(o, "Test Status") == "FAIL")
bBlankResult = false
if (bBlankResult)
{
strObjectText = o."Object Text"
nLength = length(strObjectText)
strBaseID = strSpace probeAttr_(o, "Base ID") strSpace
strTemp = "Blank Result at BaseID" strBaseID strNewLine
print strTemp
highlightText(o, 1, nLength, 1, false)
halt
} // end if (bBlankResult)
}
else if((probeAttr_(o, "VV Test Identifier") == "Tester Input") && (probeAttr_(o, "Test Comment") == strBlank))// Blank string
{
strObjectText = o."Object Text"
strBaseID = strSpace probeAttr_(o, BID) strSpace
strTemp = "Tester Input Blank at BaseID" strBaseID strNewLine
print strTemp
nLength = length(strObjectText)
highlightText(o, 1, nLength, 1, false)
halt
}
} // end for o in m do
Gedinfo - Thu Nov 15 13:47:10 EST 2012 |
Re: Highlight an object in a module issue Put this before the hightlightText() function:
-Louie I'd be tempted to change your loop such that it finds the NEXT object with an issue:
|
Re: Highlight an object in a module issue I did not see any reference to the object being current for highlightText(). This script now works as expected. |